package com.wanmait.demo.service.impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.demo.mapper.TownMapper;
import com.wanmait.demo.pojo.Town;
import com.wanmait.demo.service.TownService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class TownServiceimpl implements TownService {
    //zjj
    public List<Town> findAllByDistrictId(Integer id){
        List<Town> townList=townMapper.selectListByDistrictId(id);
        return townList;
    }



    @Resource
    private TownMapper townMapper;
    @Override
    public void insert(Town object) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(Town object) {

    }

    @Override
    public Town findById(Integer id) {
        return null;
    }

    @Override
    public List<Town> findAll() {
        return null;
    }

    @Override
    public PageInfo<Town> findPage(int pageNum, int pageSize) {
        return null;
    }

    @Override
    public List<Town> selectalltown(int districtid) {
        return townMapper.selectalltown(districtid);//尹山坤
    }
}
